﻿#ifndef TEXTTICKER_H
#define TEXTTICKER_H

#include <QLabel>

class TextTicker : public QLabel
{
    Q_OBJECT


public:
    TextTicker(QWidget *parent = 0);
    ~TextTicker();

protected:
    void paintEvent(QPaintEvent *event);
    void updateIndex();

private:
    int m_curIndex;
    int m_charWidth; //字符串宽度
    QString m_showText; //需要显示的字符串
};

#endif // TEXTTICKER_H
